//var hide_empty_list=true;
var disable_empty_list=true; //uncomment this line to disable empty selection lists
addListGroup("divisions", "division");

addList("division", "Select a division", "", "");
<%for(int divisions=1;divisions<=season.getLeagueList().divisions().length;divisions++){ %>
addList("division", "<%if(season.isLeague()){%>Division<%}else{%> Group <%}%> <%=divisions%>", "<%=divisions%>", "division<%=divisions%>");

addList("division<%=divisions%>", "Select match", "", "");


<%}%>



<%for(int i=0;i<fixtures.matches().length;i++){
MatchBean match = fixtures.matches()[i];%>
addList("division<%=match.getDivisionId()%>", "<%=match.getTeamAName()%> vs <%=match.getTeamBName()%> - <%=match.dateOfMatch()%>", "<%=match.getID()%>", "division<%=match.getDivisionId()%>HOME");




<%}%>
